﻿<UserControl x:Class="BestCode.Creds.UI.VwEntitiesChildren"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="clr-namespace:BestCode.Wpf.Controls;assembly=BestCode.Wpf.Controls"
             xmlns:data="clr-namespace:BestCode.Wpf.Controls.Data;assembly=BestCode.Wpf.Controls.Data"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="400">
    <Grid>
        <controls:FormHeader TitleText="CHILDREN ENTITIES" DescriptionText="One entity has many sub Entities for organize output folders" Margin="0">
            <Grid>
                <data:Navigator Height="335" VerticalAlignment="Top" VisibilityButtonFind="Collapsed">
                    <Grid Margin="0,0,0,0" Height="300">
                        <TextBlock Text="Name :" Margin="10,10,0,0" Height="22" VerticalAlignment="Top" HorizontalAlignment="Left" Width="48"/>
                        <TextBlock Text="Description :" Margin="10,74,489,0" Height="20" VerticalAlignment="Top"/>
                        <TextBox Height="23" Margin="63,9,64,0"  Text="{Binding SelectedItem.Name, Mode=TwoWay}" VerticalAlignment="Top" />
                        <TextBlock Text="Pictures From :" Margin="10,37,0,0" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="85"/>
                        <TextBox Height="22" Text="{Binding SelectedItem.PicturesFolder, Mode=TwoWay}" Margin="100,37,50,0" VerticalAlignment="Top" FontSize="14" FontWeight="Bold" />
                        <Button Margin="0,37,10,0" Content="......" Click="Button_Click" Height="23" VerticalAlignment="Top" HorizontalAlignment="Right" Width="35" />
                        <TextBox Height="23" Margin="0,9,10,0"  Text="{Binding SelectedItem.CredentialCost, Mode=TwoWay}" VerticalAlignment="Top" HorizontalAlignment="Right" Width="49" />

                    </Grid>
                </data:Navigator>

                <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding Items,Mode=TwoWay}" 
                  SelectedItem="{Binding SelectedItem,Mode=TwoWay}" Margin="6,103,6,53" IsReadOnly="True">

                    <DataGrid.Columns>
                        <DataGridTextColumn Header="Name" Binding="{Binding Name}"/>
                        <DataGridTextColumn Header="Picture folder" Binding="{Binding PicturesFolder}"/>
                        <DataGridTextColumn Header="Entity" Binding="{Binding Entity.Name}"/>


                    </DataGrid.Columns>

                </DataGrid>

                <controls:ImageButton  TextButton="Close Window" Name="btnClose"   Height="30" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="114" Margin="0,0,10,12" Click="btnClose_Click" IsCancel="True" ImageSource="Images/close.png" />

            </Grid>

        </controls:FormHeader>
    </Grid>
</UserControl>
